/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo h1 {
    color: #ff6b6b;
    font-size: 24px;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 30px;
}

.nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.nav ul li a.active {
    color: #ff6b6b;
}

/* 轮播图样式 */
.slider {
    margin-top: 60px;
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    transition: transform 0.5s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.slide-content p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.slider-btn:hover {
    background: rgba(255,255,255,0.8);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.dot.active {
    background: #fff;
}

/* 商品卡片样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img {
    height: 200px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.price {
    margin-top: 10px;
}

.price .current {
    color: #ff6b6b;
    font-size: 18px;
    font-weight: bold;
}

.price .original {
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
    font-size: 14px;
}

.sales {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

/* 页脚样式 */
.footer {
    background: #f8f9fa;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
    margin: 0 20px;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px 0 0 20px;
    outline: none;
}

.search-box button {
    padding: 8px 15px;
    background: #ff6b6b;
    border: none;
    border-radius: 0 20px 20px 0;
    color: white;
    cursor: pointer;
}

/* 分类样式改进 */
.category-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-item h3 {
    margin: 10px 0 5px;
}

.category-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 商品卡片改进 */
.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    margin-right: 5px;
}

.badge.new {
    background: #51cf66;
}

.badge.discount {
    background: #ff6b6b;
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.9);
    transition: bottom 0.3s;
}

.product-card:hover .product-actions {
    bottom: 0;
}

.btn-action {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    background: #ff6b6b;
    color: #fff;
}

/* 按钮样式 */
.btn-primary {
    background: #ff6b6b;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #ff6b6b;
    color: white;
}

/* 其他样式改进 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-tabs {
    display: flex;
    gap: 15px;
}

.tab {
    padding: 8px 15px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    font-weight: 500;
}

.tab.active {
    color: #ff6b6b;
    border-bottom: 2px solid #ff6b6b;
}

.view-more {
    text-align: center;
    margin-top: 40px;
}

/* 顶部通知栏 */
.top-bar {
    background: #f8f9fa;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement i {
    color: #ff6b6b;
    margin-right: 5px;
}

.top-links a {
    color: #666;
    margin-left: 15px;
    text-decoration: none;
}

.top-links a:hover {
    color: #ff6b6b;
}

/* 快速分类 */
.quick-categories {
    padding: 30px 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.category-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item i {
    font-size: 24px;
    color: #ff6b6b;
    margin-bottom: 8px;
}

/* 商品卡片改进 */
.product-card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-buy {
    width: 100%;
    padding: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-buy:hover {
    background: #ff5252;
}

/* 特色服务 */
.features {
    padding: 50px 0;
    background: #f8f9fa;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-item i {
    font-size: 36px;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.feature-item h3 {
    margin-bottom: 10px;
    color: #333;
}

.feature-item p {
    color: #666;
}

/* 页脚改进 */
.footer {
    background: #2d3436;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ddd;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: #ff6b6b;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #fff;
    font-size: 20px;
}

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: #ddd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        padding: 10px;
    }

    .search-box {
        width: 100%;
        margin: 10px 0;
    }

    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav ul li {
        margin: 5px 10px;
    }

    .quick-categories {
        padding: 15px 0;
    }

    .category-list {
        flex-wrap: wrap;
        gap: 15px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
} 

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1100;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 15vh auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.modal h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: #ff6b6b;
    outline: none;
}

.form-footer {
    margin-top: 20px;
    text-align: center;
}

.form-footer p {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.form-footer a {
    color: #ff6b6b;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 错误提示样式 */
.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* 用户菜单样式 */
.user-menu {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 1000;
}

.user-menu:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #ff6b6b;
}

.dropdown-menu i {
    width: 20px;
    margin-right: 8px;
}

/* 分隔线 */
.dropdown-menu .divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
}

/* 用户状态样式 */
.user-text {
    margin-left: 5px;
}

.guest-menu, .user-menu-logged {
    min-width: 150px;
} 

/* 邮箱验证码样式 */
.email-verify {
    display: flex;
    gap: 10px;
}

.email-verify input {
    flex: 1;
}

.btn-verify {
    padding: 8px 12px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    min-width: 100px;
}

.btn-verify:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 密码强度样式 */
.password-strength {
    margin-top: 5px;
}

.strength-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-level {
    height: 100%;
    width: 0;
    transition: all 0.3s;
}

.strength-level.weak {
    width: 33.33%;
    background: #ff4444;
}

.strength-level.medium {
    width: 66.66%;
    background: #ffbb33;
}

.strength-level.strong {
    width: 100%;
    background: #00C851;
}

.strength-text {
    font-size: 12px;
    color: #666;
}

/* 错误提示样式 */
.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-top: 5px;
    display: block;
} 